import { sequelize } from "../../init";
import { DataTypes } from "sequelize";

export const User = sequelize.define(
    "User",
    {
        username: {
            type: DataTypes.STRING,
            allowNull: false
        },
        password: {
            type: DataTypes.STRING,
            allowNull: false,
        },
        phone: {
            type: DataTypes.STRING(11),
            allowNull: true,
            unique: true
        },
    },
    {
        freezeTableName: true,
        paranoid: true, //删除数据为逻辑删除
    }
);


